﻿<UserControl x:Class="XamlPhysics.Samples.FixedRevoluteJoint"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:physics="clr-namespace:XamlPhysics;assembly=XamlPhysics">

    <Canvas x:Name="LayoutRoot">
        <Rectangle x:Name="UxBox1" Canvas.Left="500" Canvas.Top="525" Width="100" Height="100" Fill="DarkRed">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody />
            </physics:PhysicalBox.Body>
        </Rectangle>
        <Rectangle x:Name="UxBox2" Canvas.Left="442" Canvas.Top="208" Width="100" Height="100" Fill="DarkGreen">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody />
            </physics:PhysicalBox.Body>
        </Rectangle>

        <physics:FixedRevoluteJoint Body="{Binding ElementName=UxBox1}" Canvas.Left="600" Canvas.Top="598" />

        <Rectangle Canvas.Left="-100" Canvas.Top="768" Width="1240" Height="10" Fill="Black">
            <physics:PhysicalBox.Body>
                <physics:RectangleBody IsStatic="True" />
            </physics:PhysicalBox.Body>
        </Rectangle>
    </Canvas>
</UserControl>